//
//  CNFileLogger.m
//  CsdnPlus
//
//  Created by szh on 2020/6/9.
//  Copyright © 2020 CSDN. All rights reserved.
//

#import "CNFileLogger.h"

@implementation CNFileLogger

- (instancetype)initWithSavePath:(NSString *)path{
    //新建一个文件夹去保存
    NSString *logsDirectory = [NSHomeDirectory() stringByAppendingPathComponent:[NSString stringWithFormat:@"Library/Caches/%@",path]];
    DDLogFileManagerDefault *defaultLogFileManager = [[DDLogFileManagerDefault alloc] initWithLogsDirectory:logsDirectory];
    return [self initWithLogFileManager:defaultLogFileManager];
}
@end
